package com.jx.gn.dao;

import com.jx.gn.entity.user.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMapper {

    @Insert("" +
            "INSERT INTO `wx_user`( `wxId`, `idCard`, `createTime`, `wxInfo`) VALUES ( #{bean.wxId}, #{bean.idCard}, #{bean.createTime}, #{bean.wxInfo})" +
            "")
    int saveUser(@Param("bean")User user);
    @Select("" +
            "select * from wx_user where `wxId` =#{wxId}" +
            "")
    User getUserByWxId(@Param("wxId")String wxId);
}
